/*
 * @Description:作业题1
 * 
 * @Author: rendc
 * 
 * @Date: 2025-07-18 14:48:49
 * 
 * @LastEditors: rendc
 * 
 * @LastEditTime: 2025-07-18 15:10:01
 */
// package HOMEWORK;

public class Test01 {
  // 主方法
  public static void main(String[] args) {
    String s1Name = "MacBookAir";
    String s2Name = "ThinkPadT490";
    String s3Name = "MateBook 14";
    double s1Size = 13.3;
    double s2Size = 14.0;
    double s3Size = 14.0;
    double s1Price = 5699.0;
    double s2Price = 8499.0;
    double s3Price = 7199.0;
    int s1Num = 5;
    int s2Num = 10;
    int s3Num = 18;
    System.out.println("----------------商场库存清单------------");
    System.out.println("品牌型号\t尺寸\t价格\t库存数");
    // \n 换行
    // \t 缩进
    System.out.println(s1Name + "\t" + s1Size + "\t" + s1Price + "\t" + s1Num);
    System.out.println(s2Name + "\t" + s2Size + "\t" + s2Price + "\t" + s2Num);
    System.out.println(s3Name + "\t" + s3Size + "\t" + s3Price + "\t" + s3Num);
    System.out.println("----------------------------------------");
    int totalNum = s1Num + s2Num + s3Num;
    System.out.println("库存总数：" + totalNum);
    double totalPrice = s1Price * s1Num + s2Price * s2Num + s3Price * s3Num;
    System.out.println("商品库存总金额：" + totalPrice);
    // System.out.println("库存总数：" + (s1Num + s2Num + s3Num));
  }
}